Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Biome #28

Merged
merged 2 commits into from
Jul 9, 2024
Merged

Move to Biome #28

merged 2 commits into from
Jul 9, 2024

Conversation

kibertoad
Copy link
Collaborator

Changes

Biome is faster and brings in way less dependencies.

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary

@kibertoad kibertoad requested a review from a team July 8, 2024 21:07
"linter": {
"rules": {
"performance": {
"noBarrelFile": "off",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Shouldn't this be "on"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That rule is mostly useful for applications or larger libraries with plenty of optional imports. What would be the benefit of having indirect export structure in a library with just a few exports?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simply aim for consistency, and never use barrel files (no matter the size of the project). Or are there any scenarios where we still want to use them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that if you don't have a barrel file in a library, you can no longer have imports like

import { Client, RequestError, EMPTY_SCHEMA } from 'my-library'

unless they all come from the same file. For me this also brings worse DX, or clutters code structure of the library.

So for libraries where tree-shaking is not important I'd still go with barrel files. maybe we need separate biome preset for them

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. We need to find the right balance with this.

@kibertoad kibertoad merged commit 5312a98 into main Jul 9, 2024
5 checks passed
@kibertoad kibertoad deleted the chore/biome branch July 9, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants